package 自动填充.main.java.com.itheima;

import com.itheima.dao.BookDao;
import com.itheima.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppForDIAutoware {
    public static void main( String[] args ) {
        //创建包含配置文件里对象的IOC容器对象
        ApplicationContext IOC= new ClassPathXmlApplicationContext("applicationContext.xml");
        //获取对象
        BookService bookService = (BookService) IOC.getBean("BookService");
        bookService.save();
    }
}

